package com.lqq.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LogoutController {
    @RequestMapping("/logout")
    public String logout(Model model, HttpSession session) {
        //删除用户session
        session.removeAttribute("user");
        model.addAttribute("msg", "您已经成功退出！！！");
        return "index";
    }
}
